]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[Notification] Replace all newlines in body with spaces
authorFlorian Müllner <fmuellner@src.gnome.org>
Sat, 20 Feb 2010 21:08:54 +0000 (22:08 +0100)
committerFlorian Müllner <fmuellner@src.gnome.org>
Sun, 21 Feb 2010 02:54:13 +0000 (03:54 +0100)
Accidentally we only replaced the first newline of the body text with
spaces - replace all occurrences instead.

https://bugzilla.gnome.org/show_bug.cgi?id=610549

js/ui/messageTray.js

index 06dd250bb94ba656c7f8d5f8fb8a84792469be02..188a55fb2ca31609a3f066fc33787754874c0dc8 100644 (file)
@@ -116,7 +116,7 @@ Notification.prototype = {
                                           y_fill: false });
 
         this._titleLabel = new St.Label();
-        title = title ? _cleanMarkup(title.replace('\n', ' ')) : '';
+        title = title ? _cleanMarkup(title.replace(/\n/g, ' ')) : '';
         this._titleLabel.clutter_text.set_markup('<b>' + title + '</b>');
         this._bannerBox.add_actor(this._titleLabel);
 
@@ -126,7 +126,7 @@ Notification.prototype = {
             this._bannerBodyText = null;
 
         this._bannerLabel = new St.Label();
-        banner = banner ? _cleanMarkup(banner.replace('\n', '  ')) : '';
+        banner = banner ? _cleanMarkup(banner.replace(/\n/g, '  ')) : '';
         this._bannerLabel.clutter_text.set_markup(banner);
         this._bannerBox.add_actor(this._bannerLabel);
     },